package renderer;

import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;

import texture.GLColor;
public interface GLRenderer {
	public void flush();

	public void initDisplay(int width, int height);

	public void enterOrtho(int xsize, int ysize);

	public void glClearColor(float red, float green, float blue, float alpha);

	public void glClipPlane(int plane, DoubleBuffer buffer);

	public void glScissor(int x, int y, int width, int height);

	public void glLineWidth(float width);

	public void glClear(int value);

	public void glColorMask(boolean red, boolean green, boolean blue, boolean alpha);

	public void glLoadIdentity();

	public void glGetInteger(int id, IntBuffer ret);

	public void glGetFloat(int id, FloatBuffer ret);

	public void glEnable(int item);

	public void glDisable(int item);

	public void glBindTexture(int target, int id);

	public void glGetTexImage(int target, int level, int format, int type, ByteBuffer pixels);

	public void glDeleteTextures(IntBuffer buffer);

	public void glColor4f(float r, float g, float b, float a);
	
	public void glColor(GLColor color);

	public void glTexCoord2f(float u, float v);

	public void glVertex3f(float x, float y, float z);

	public void glVertex2f(float x, float y);

	public void glRotatef(float angle, float x, float y, float z);

	public void glTranslatef(float x, float y, float z);

	public void glBegin(int geomType);

	public void glEnd();

	public void glTexEnvi(int target, int mode, int value);

	public void glPointSize(float size);

	public void glScalef(float x, float y, float z);

	public void glPushMatrix();

	public void glPopMatrix();

	public void glBlendFunc(int src, int dest);

	public int glGenLists(int count);

	public void glNewList(int id, int option);

	public void glEndList();

	public void glCallList(int id);

	public void glCopyTexImage2D(
			int target, int level, int internalFormat, 
			int x, int y, int width, int height, int border);

	public void glReadPixels(
			int x, int y, int width, int height, int format,
			int type, ByteBuffer pixels);

	public void glTexParameteri(int target, int param, int value);

	public float[] getCurrentColor();

	public void glDeleteLists(int list, int count);

	public void glDepthMask(boolean mask);

	public void glClearDepth(float value);

	public void glDepthFunc(int func);

	public void setGlobalAlphaScale(float alphaScale);

	public void glLoadMatrix(FloatBuffer buffer);

	public void glGenTextures(IntBuffer ids);

	public void glGetError();
	
	public void glTexImage2D(
			int target, int i, int dstPixelFormat,
			int get2Fold, int get2Fold2, int j, int srcPixelFormat,
			int glUnsignedByte, ByteBuffer textureBuffer);
	
	public void glTexSubImage2D(
			int glTexture2d, int i, int pageX, int pageY,
			int width, int height, int glBgra, int glUnsignedByte,
			ByteBuffer scratchByteBuffer);
	
	public boolean canTextureMirrorClamp();

	public boolean canSecondaryColor();

	public void glSecondaryColor3ubEXT(byte b, byte c, byte d);
}
